package com.chinasoft.set01.set03;

import java.util.TreeSet;

public class Test03 {
    public static void main(String[] args) {
        TreeSet<Student> ts = new TreeSet<>();
        Student s1 = new Student("jack",98,88,100);
        Student s2 = new Student("dali",100,100,100);
        Student s3 = new Student("tom",98,88,100);
        Student s4 = new Student("lily",60,60,60);
        Student s5 = new Student("hmm",60,88,100);

        ts.add(s1);
        ts.add(s2);
        ts.add(s3);
        ts.add(s4);
        ts.add(s5);

        for (Student s:ts){
            System.out.println(s.getName()+","+s.getChinese()+","+s.getMath()+","+s.getEnglish());
        }
    }
}